package com.cp.config;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.cp.properties.CpDataSourceProperties;
import com.cp.properties.CpDruidStatProperties;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;

/**
 * Des:
 * <p>
 * CpDataSourceProperties在CpDataSourceConfiguration之前加载
 *
 * @author XL
 * AutoConfigureOrder() 提高自动配置的优先级
 * AutoConfigureBefore()针对 自动配置类进行顺序加载
 * @Date 2022/2/11 10:19
 */
@EnableConfigurationProperties({CpDataSourceProperties.class, CpDruidStatProperties.class})
@Import({CpDataSourceProperties.class, CpDruidStatProperties.class})
@AutoConfigureBefore(DruidDataSourceAutoConfigure.class)
public class CpDataSourceConfiguration {

}
